package com.itheima.day08_list集合;

import java.util.ArrayList;
import java.util.Collections;

public class Test {
    public static void main(String[] args) {

        ArrayList<String> list=new ArrayList<>();

        Collections.addAll(list,"哥伦比亚", "韩国"," 伊拉克 ","葡萄牙","阿尔及利亚"," 南非 ","斐济"
                ," 尼日利亚","阿根廷 ","墨西哥"," 日本 ","洪都拉斯","瑞典"," 丹麦 ","德国"," 巴西");


        for (int j = 1; j <= 4; j++) {
            System.out.println("第"+j+"组:");
            for (int i = 0; i < 4; i++) {
                System.out.print(list.remove((int) (Math.random() * list.size()))+" ");
            }
            System.out.println();
        }
    }
}
